package com.hopes.bizz.risk.gis.vo;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lyb
 * @version 1.0
 * @date 2024/2/23 15:40
 */

@Data
public class LineStatistics {

    private List<String> legendData = new ArrayList<>();

    private List<String> xAxisData = new ArrayList<>();

    private List<LineStatisticsData> yAxisData = new ArrayList<>();

    public void addName(String name) {
        this.xAxisData.add(name);
    }

    public void addData(String name, List<Integer> data) {
        LineStatisticsData lineStatisticsData = new LineStatisticsData();
        lineStatisticsData.setName(name);
        lineStatisticsData.setData(data);
        this.yAxisData.add(lineStatisticsData);
    }
}
